import http from "@/utils/http";

export default {
  async FETCH_ALL_ROLE ({ commit }) {
    http({
      method: "GET",
      url: `/api/admin/role`,
      params: {
        all: 1
      },
      operation: '获取角色'
    }).then(res => {
      if (res.data && res.ok) {
        commit('UPDATE_ALL_ROLE', res.data.list);
      }
    });
  },
};
